/* Class for encapsulation information about redo log file
   Copyright (C) 2018-2023 Adam Leszczynski (aleszczynski@bersler.com)

This file is part of OpenLogReplicator.

OpenLogReplicator is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3, or (at your option)
any later version.

OpenLogReplicator is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.

You should have received a copy of the GNU General Public License
along with OpenLogReplicator; see the file LICENSE;  If not see
<http://www.gnu.org/licenses/>.  */

#include "RedoLog.h"

namespace OpenLogReplicator {
    RedoLog::RedoLog(int64_t newGroup, const char* newPath) :
            group(newGroup),
            path(newPath) {
    }

    bool RedoLog::operator<(const RedoLog& other) const {
        if (group < other.group)
            return true;
        if (other.group == group) {
            if (path < other.path)
                return true;
        }
        return false;
    }
}
